<html>
<head>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?ab756408d0d966b0c189537747aeab2e";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<script type="text/javascript">
    /**
     * 获取 URL 中的参数数组
     */
     function parseQueryString(url) {
        let hash = url.indexOf("#");
        url = hash > -1 ? url.substring(0, hash) : url; // 只截取 URL 中 # 前的内容
        
        let start = url.indexOf("?"),
            queryStr = url.substring(start > -1 ? start + 1 : url.length, url.length), // 获取url中"?"符后的字串
            args = {}, // 保存参数数据的对象
            items = (queryStr.length > 0) ? queryStr.split("&") : [], // 取得每一个参数项,
            item = null,
            len = items.length;

        // 将所有参数拆解至数组中
        for (let i = 0; i < len; i++) {
            item = items[i].split("=");
            let name = decodeURIComponent(item[0]),
                value = decodeURIComponent(item[1]);
            if (name) {
                args[name] = value;
            }
        }
        return args;
    }

    /**
     * 提交事件数据
     */
    function pushData() {
        let args = parseQueryString(window.location.href);
        if (args["debug"] === "true") {
            console.warn(
                args["category"],
                args["action"],
                args["label"],
                args["value"]);
        }
        _hmt.push([
            "_trackEvent",
            args["category"],
            args["action"],
            args["label"],
            args["value"]
            ]);
    }

    // 完成页面加载后执行数据提交
    window.onload = function(){
        pushData();
    }
</script>
<style type='text/css'>
    body {
        color: #880000;
        font-family: sans-serif;
    }
</style>
</head>
<body>
Event Push - <strong>gitee</strong>
</body>
</html>
